package com.hns.frame.enumrate;

/**
 * 登录错误页面配置
 * @author:Fisher
 * @email:zhuangcaijin@126.com
 * @version Revision 2.0.0
 */
public enum LoginErrorPage {
    
    LOGIN("cloud","/login.jsp?login_error=1"),
    LOGIN_YL("yl","/login_yl.jsp?login_error=1");
    
    private String flag;
    private String url;
    private LoginErrorPage(String flag, String url){
        this.flag = flag;
        this.url = url;
    }
    
    public String getFlag() {
        return flag;
    }
    
    public String getUrl() {
        return url;
    }
    
    public static String getUrl(String flag){
        String ret = null;
        for (LoginErrorPage e : LoginErrorPage.values()) {
            if (e.getFlag().equals(flag)){
                ret = e.getUrl();
                break;
            }
        }
        return ret;
    }
}
